package com.test.mooan.labama.demo.data

import android.content.Context
import com.test.mooan.labama.demo.util.NetworkUtil
import com.test.mooan.labama.demo.util.gzipString
import com.google.gson.Gson

class WifiInfo(val context: Context) {

    fun fetch(): String? {
        return try {
            val data = hashMapOf<String, Any>().apply {
                put("currentWifi", NetworkUtil.getCurrentWifi(context))
                put("configuredWifi", "")
                put("wifiCount", "")
            }
            Gson().toJson(data).trim().gzipString()

        } catch (e: Exception) {
            null
        }
    }
}